package cn.alex.sso.project.mapper;

import cn.alex.sso.project.entity.SysClientCategory;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @author Alex
 * @description 针对表【sys_client_category(应用分类表)】的数据库操作Mapper
 * @createDate 2024-09-24 17:05:38
 * @Entity cn.alex.sso.project.entity.SysClientCategory
 */
public interface SysClientCategoryMapper extends BaseMapper<SysClientCategory> {

    default LambdaQueryWrapper<SysClientCategory> getQueryWrapper(SysClientCategory sysClientCategory) {
        return new LambdaQueryWrapper<SysClientCategory>()
                .like(StrUtil.isNotBlank(sysClientCategory.getName()), SysClientCategory::getName, sysClientCategory.getName())
                .orderByAsc(SysClientCategory::getSorted);
    }
}




